package com.hoperun.checkcloth.common

import com.google.gson.JsonObject
import com.google.gson.JsonParser
import com.google.gson.JsonSyntaxException

fun gsonParseStringOrNull(str: String): JsonObject? {
    return try {
        JsonParser.parseString(str).asJsonObject
    } catch (e: JsonSyntaxException) {
        null
    }
}

